package com.moyun.zbmy.zizhou.ui.adapter.holder;

import android.content.Context;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.GridLayout;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.Toast;

import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.moyun.zbmy.zizhou.R;
import com.moyun.zbmy.zizhou.beans.SubscriptionNoBean;
import com.moyun.zbmy.zizhou.beans.SubscriptionNoTypeList;
import com.moyun.zbmy.zizhou.ui.adapter.SubscriptionNoAdapter;
import com.moyun.zbmy.zizhou.ui.adapter.SubscriptionNoHomeTypeAdapter;
import com.moyun.zbmy.zizhou.ui.utils.GlideCircleTransform;
import com.moyun.zbmy.zizhou.ui.utils.GlideUtil;
import com.ruihang.generalibrary.ui.widget.CustomFontTextView;

import butterknife.BindView;
import butterknife.ButterKnife;

public class SubscriptionNoHomeTypeHolder extends BaseAbsHolder<SubscriptionNoTypeList> {

    @BindView(R.id.subscription_no_home_type_list)
    protected GridView typeListView;
    @BindView(R.id.item_only_title)
    protected CustomFontTextView name;


    private SubscriptionNoTypeList temp;
    private SubscriptionNoHomeTypeAdapter.OnHomeSubscriptionNoTypeClickListener clickListener;

    public SubscriptionNoHomeTypeHolder(Context context, View itemView, SubscriptionNoHomeTypeAdapter.OnHomeSubscriptionNoTypeClickListener clickListener) {
        super(context, itemView);
        this.clickListener = clickListener;
    }


    @Override
    protected void initInject() {
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void setData(SubscriptionNoTypeList t) {
        temp = t;
        name.setText("订阅号");
        SubscriptionNoHomeTypeAdapter adapter = new SubscriptionNoHomeTypeAdapter(context, t.getWxList(), clickListener);
        typeListView.setAdapter(adapter);
    }

    @Override
    public void setItemMode(int mode) {
        super.setItemMode(mode);

    }

    @Override
    public void onDestory() {
        super.onDestory();

    }

}